home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6165 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  932 b 

  1. Path: mics.demon.co.uk!Bill
  2. From: Bill Michell <Bill@mics.demon.co.uk>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: novice question on copy constru
  5. Date: Sun, 11 Feb 1996 00:27:05 +0000
  6. Organization: None
  7. Distribution: world
  8. Message-ID: <AL9SoXAZfTHxEwVN@mics.demon.co.uk>
  9. References: <4efpie$jsq@news.ust.hk>
  10. NNTP-Posting-Host: mics.demon.co.uk
  11. X-NNTP-Posting-Host: mics.demon.co.uk
  12. MIME-Version: 1.0
  13. X-Newsreader: Turnpike Version 1.11 <uiEOes1orVXTvvWgSAnAOBUy+p>
  14.  
  15. In article <4efpie$jsq@news.ust.hk>, Chan Ka Ming
  16. <ee_ckmaa@uxmail.ust.hk> writes
  17. >I don't understand why one should create a copy constructor. Doesn't the
  18. >computer will do the job for you when pass arguments by value? Thanks
  19. >
  20. >
  21. You only need to supply a non-default copy coinstructor if your object
  22. includes pointers (correct me if I'm wrong) to anything. Even ten, it is
  23. not always necessary. Any standard text on C++ will explain when copy
  24. constructors are needed.
  25.